package com.cheng.user.controller;

import com.cheng.dubbo.api.user.DemoUserService;
import com.cheng.dubbo.api.user.vo.DemoUserLoginVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "用户")
@RestController
@RequestMapping("/demo/user")
public class DemoUserController {

    @Autowired
    private DemoUserService demoUserService;

    @PostMapping("/login")
    @ApiOperation("登录")
    public String login(@RequestBody DemoUserLoginVO userLoginVO) {
        System.out.println("测试");
        return demoUserService.userLogin(userLoginVO);
    }
}
